package utils

import (
	"reflect"
	"runtime"
	"strings"
)

func FuncName(f interface{}) string {
	name := strings.Split(
		runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name(), ".",
	)
	return name[len(name)-1]
}
